home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.2 KB | 38 lines | [TEXT/GEOL] |
- Item 2833047 15-Sept-89 09:56
-
- From: ALGER Alger, Jeff,VCA
-
- To: D2999 Catalyst, Richard Wolfson,PRT
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: Response to Uses Clause
-
- Steve,
-
- Here is a simplified set of rules:
-
- • A type must be declared before it can be referenced as part of another type.
- • A constant must be declared before it can be referenced in another constant.
-
- This leads to the following:
-
- 1. If unit A's interface is dependent on unit B's interface and you Use unit A
- anywhere, then you must preceed it with B in the Uses clause.
- 2. Rule 1 must be applied recursively.
-
- Remember: you need only worry about dependencies amongst the interfaces, not
- the implementation sections.
-
- One way to manage this mess is to construct a directed graph of dependencies
- amongst the interfaces. The nodes are the units. Draw an arrow from unit A to
- unit B if unit A's interface depends on any type, constant, etc., declared in
- unit B. When you construct the Uses clause for a new unit, make sure that unit
- X appears before unit Y whenever there is a path from Y to X.
-
- Hope that helps.
-
- Jeff Alger
- KPMG Peat Marwick
-
-